package com.example.demo.mapper;

import com.example.demo.web.rest.evt.NoticeByIdEvt;
import com.example.demo.web.rest.evt.NoticeSearchEvt;
import com.example.demo.web.rest.vm.NoticeVm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface NoticeMapper {

    public List<Map<String,Object>> getCode(@Param("tableName") String tableName, @Param("colName") String colName);

    public Integer selectInfosCount(NoticeSearchEvt evt);

    public List<NoticeVm> selectInfos(NoticeSearchEvt evt);

    public NoticeVm selectInfoById(NoticeByIdEvt evt);

    public void insertNotice(NoticeVm vm);

    public void editNotice(NoticeVm vm);

    public void publishNotice(NoticeVm vm);

    public void deleteById(NoticeByIdEvt evt);

    List<NoticeVm> getLatestNotice(int limitNum);
}
